<template>
	<view class="mainbgc" v-if="pageshow" @click="hidefalse">
		<header-top :messageInfo="{typeFlag:true,message:'查看单据',liner:false}">
			<view class="rightmsg" slot="rightmsg">
				<view class="rightmsg_content">
					<view class="diandiandian" @click.stop="dian">
						<view class="selectcontent" v-show="selectshow">
							<text @click.stop="cleardata">清除一个月前单据</text>
							<view class="sanjiao"></view>
						</view>
					</view>
				</view>
			</view>
		</header-top>
		<view class="mainpadding2">
			<u-tabs :list="tags" :activeStyle="{ color: '#0BBDCB' }" lineColor="#0BBDCB" @click="tabclick"></u-tabs>
		</view>
		<!-- 销售单 -->
		<view v-show="current==0">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">客户名称</view>
				<view class="strongtext xs3 flexcenter">操作时间</view>
				<view class="strongtext xs4 flexcenter">金额</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[0].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[0].list.data" :key="item.id"
					@click="jumpdetailxs(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.customer_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
						<view class="smalltext" v-show="item.sales_return==1">（含退）</view>
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 退货单 -->
		<view v-show="current==1">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">客户名称</view>
				<view class="strongtext xs3 flexcenter">操作时间</view>
				<view class="strongtext xs4 flexcenter">金额</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[1].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[1].list.data" :key="item.id"
					@click="jumpdetailth(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.customer_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
						<view class="smalltext" v-show="item.sales_return==1">（含退）</view>
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 订货单 -->
		<view v-show="current==2">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">客户名称</view>
				<view class="strongtext xs3 flexcenter">操作时间</view>
				<view class="strongtext xs4 flexcenter">金额</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[2].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[2].list.data" :key="item.id"
					@click="jumpdetaildh(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.customer_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
						<view class="smalltext" v-show="item.sales_return==1">（含退）</view>
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 采购单 -->
		<view v-show="current==3">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">供应商</view>
				<view class="strongtext xs3 flexcenter">操作时间</view>
				<view class="strongtext xs4 flexcenter">金额</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[3].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[3].list.data" :key="item.id"
					@click="jumpdetailcg(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.supplyer_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 调拨单 -->
		<view v-show="current==4">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">出仓</view>
				<view class="strongtext xs3 flexcenter">入仓</view>
				<view class="strongtext xs4 flexcenter">操作时间</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[4].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[4].list.data" :key="item.id"
					@click="jumpdetailkcdb(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.stores_out_name}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.stores_enter_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 客户结算 -->
		<view v-show="current==5">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext sk1">单据编号</view>
				<view class="strongtext sk2 flexcenter">客户名称</view>
				<view class="strongtext sk3 flexcenter">操作时间</view>
				<view class="strongtext sk4 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[5].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[5].list.data" :key="item.id"
					@click="jumpdetailkhjs(item.purchase_code)">
					<view class="sk1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="sk2 flexcolumn">
						<view class="nostrongtext">{{item.stores_out_name}}</view>
					</view>
					<view class="sk3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="sk4 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 费用支出 -->
		<view v-show="current==6">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext sk1">单据编号</view>
				<view class="strongtext sk2 flexcenter">操作时间</view>
				<view class="strongtext sk3 flexcenter">金额</view>
				<view class="strongtext sk4 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[6].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[6].list.data" :key="item.id"
					@click="jumpfyzc(item.purchase_code)">
					<view class="sk1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="sk2 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="sk3 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
					</view>
					<view class="sk4 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==2">已驳回</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 费用合同 -->
		<view v-show="current==7">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext sk1">单据编号</view>
				<view class="strongtext sk2 flexcenter">客户名称</view>
				<view class="strongtext sk3 flexcenter">操作时间</view>
				<view class="strongtext sk4 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[7].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[7].list.data" :key="item.id"
					@click="jumpfyht(item.purchase_code)">
					<view class="sk1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="sk2 flexcolumn">
						<view class="nostrongtext">{{item.customer_name}}</view>
					</view>
					<view class="sk3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="sk4 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 客户预收款 -->
		<view v-show="current==8">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">客户名称</view>
				<view class="strongtext xs3 flexcenter">操作时间</view>
				<view class="strongtext xs4 flexcenter">金额</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[8].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[8].list.data" :key="item.id"
					@click="jumpkhysk(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.customer_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
						<!-- <view class="smalltext">（含退）</view> -->
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 盘点单 -->
		<view v-show="current==9">
			<view class="mainpadding ffffff flexbetween">
				<view class="strongtext sk1">单据编号</view>
				<!-- <view class="strongtext sk2 flexcenter">客户名称</view> -->
				<view class="strongtext sk3 flexcenter">操作时间</view>
				<view class="strongtext sk4 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[9].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexbetween" v-for="item in tabspages[9].list.data" :key="item.id"
					@click="jumppdd(item)">
					<view class="sk1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<!-- <view class="sk2 flexcolumn">
						<view class="nostrongtext">{{item.customer_name}}</view>
					</view> -->
					<view class="sk3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="sk4 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 采购退货单 -->
		<view v-show="current==10">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">供应商</view>
				<view class="strongtext xs3 flexcenter">操作时间</view>
				<view class="strongtext xs4 flexcenter">金额</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[10].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[10].list.data" :key="item.id"
					@click="jumpdetailcgth(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.supplyer_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
		<!-- 供应商结算 -->
		<view v-show="current==11">
			<view class="mainpadding ffffff flexleft">
				<view class="strongtext xs1">单据编号</view>
				<view class="strongtext xs2 flexcenter">供应商</view>
				<view class="strongtext xs3 flexcenter">操作时间</view>
				<view class="strongtext xs4 flexcenter">金额</view>
				<view class="strongtext xs5 flexright">状态</view>
			</view>
			<view class="flexcenter" v-if="!tabspages[11].list.data.length">
				<view class="placeholderimage"></view>
			</view>
			<view class="contentbox-padding margin_top ffffff">
				<view class="itemcontentbox flexleft" v-for="item in tabspages[11].list.data" :key="item.id"
					@click="jumpdetailgysjs(item.purchase_code)">
					<view class="xs1">
						<view class="nostrongtext">{{item.purchase_code}}</view>
					</view>
					<view class="xs2 flexcenter">
						<view class="nostrongtext">{{item.supplyer_name}}</view>
					</view>
					<view class="xs3 flexcolumn">
						<view class="nostrongtext">{{item.time_text[0]}}</view>
						<view class="nostrongtext">{{item.time_text[1]}}</view>
					</view>
					<view class="xs4 flexcolumn">
						<view class="nostrongtext">{{item.real_money}}</view>
					</view>
					<view class="xs5 flexright">
						<view class="color1 flexright" v-show="item.examine_status==1">已审核</view>
						<view class="color2 flexright" v-show="item.examine_status==0">未审核</view>
						<view class="color3 flexright" v-show="item.examine_status==-1">草稿</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				pageshow: false,
				tags: [{
						name: '销售单',
					}, {
						name: '退货单',
					},
					{
						name: '订货单',
					},
					{
						name: '采购单',
					}, {
						name: '调拨单',
					}, {
						name: '客户结算'
					}, {
						name: '费用支出'
					}, {
						name: '费用合同'
					}, {
						name: '客户预收款'
					}, {
						name: '盘点单'
					},
					{
						name: '采购退货单'
					},
					// {
					// 	name: '供应商结算'
					// }
				],
				current: 0,
				selectshow: false,
				tabspages: [{
					list: {
						data: [],
						last_page: "",
						current_page: 1
					}
				}],
				apilist: ['appapi/manage/goods/sales', //销售单
					'appapi/manage/goods/sales_exchange', //退货单
					'appapi/manage/goods/order', //订货单
					'appapi/manage/goods/purchase', //采购单
					'appapi/manage/warehouse/allocation', //调拨单
					'appapi/manage/finance/collection', //客户结算
					'appapi/manage/finance/cost_expend', //费用支出
					'appapi/manage/finance/cost_contract', //费用合同
					'appapi/manage/finance/collection_advance', //客户预收款
					'appapi/manage/warehouse/inventory', //盘点单
					'appapi/manage/goods/exchange', //采购退货单
					// 'appapi/manage/goods/exchange', //供应商结算
				],
			}
		},
		onLoad() {
			this.apilist.forEach((item, index) => {
				this.tabspages.push({
					id: index,
					limit: 20,
					list: {
						data: [],
						last_page: "",
						current_page: 1
					},
				})
			})
			this.resetMsg()
		},
		onShow() {
			this.selectshow = false
		},
		methods: {
			resetMsg() {
				this.tabspages.forEach((item, index) => {
					this.getlist(index)
				})
			},
			getlist(index, isPage, page) {
				if (this.apilist[index] == '') {
					return false
				}
				let _this = this
				let data = {
					page: page || 1,
					limit: this.tabspages[index].limit || 8,
					self: 0
				}
				httpRequest.request(this.apilist[index], 'POST', data, false, false, true).then(res => {
					if (res.code == 1) {
						let resList = res.data;
						let dataList = _this.tabspages[index].list
						res.data.data.forEach(item => {
							item.time_text = item.time_text.split(" ")
						})
						if (isPage == true) {
							_this.tabspages[index].list.data = dataList.data.concat(resList.data);
						} else {
							_this.tabspages[index].list = resList
						}
						this.pageshow = true
					}
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
			onReachBottom() {
				let _this = this;
				let list = this.tabspages[this.current].list
				let page = this.tabspages[this.current].list.current_page
				if (list.last_page <= page) {
					return false;
				}
				page++
				this.tabspages[this.current].list.current_page = page
				this.getlist(this.current, true, page)
			},
			dian() {
				this.selectshow = this.selectshow == false ? true : false
			},
			hidefalse() {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
			},
			// 跳转客户预收款
			jumpkhysk(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/caiwu/kehuysk?purchase_code=' + purchase_code
				})
			},
			// 盘点单
			jumppdd(item) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				let msg = {
					purchase_code: item.purchase_code, //费用合同单据编号
					ck_id: '', //仓库id
					kh_id: "",
					yg_id: "",
					type: 1, //1销货单，2退货单
					sp_code: '', //商品编号
					mr_sjstate: '', //默认价格
					goods_ids: [],
					db_type: "", //调拨类型
					pdtype: item.examine_status == 1 ? 2 : 1, //1开始盘点，2盘点完成
				}
				uni.navigateTo({
					url: '/pages/workbench/kucun/pandiandan?getmsg=' +
						encodeURIComponent(JSON.stringify(msg))
				})
			},
			// 采购退货单详情
			jumpdetailcgth(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/caigou/caigouthd?purchase_code=' + purchase_code
				})
			},
			// 费用合同详情
			jumpfyht(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/xiaoshou/feiyonghetong?purchase_code=' + purchase_code
				})
			},
			// 费用支出
			jumpfyzc(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/caiwu/feiyongzc?purchase_code=' + purchase_code
				})
			},
			// 调拨单详情
			jumpdetailkcdb(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/kucun/kucundiaobo?purchase_code=' + purchase_code
				})
			},
			// 客户计算详情
			jumpdetailkhjs(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/caiwu/kehujsdetail?purchase_code=' + purchase_code
				})
			},
			// 销售单详情
			jumpdetailxs(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/xiaoshou/xiaoshoudd?purchase_code=' + purchase_code
				})
			},
			// 退货单详情
			jumpdetailth(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/xiaoshou/tuihuodan?purchase_code=' + purchase_code
				})
			},
			// 订货单详情
			jumpdetaildh(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/caigou/dinghuod?purchase_code=' + purchase_code
				})
			},
			// 采购单详情
			jumpdetailcg(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/caigou/caigoudan?purchase_code=' + purchase_code
				})
			},
			// 供应商结算详情
			jumpdetailgysjs(purchase_code) {
				if (this.selectshow == true) {
					this.selectshow = false
					return
				}
				uni.navigateTo({
					url: '/pages/workbench/caiwu/gongyingsjsdetail?purchase_code=' + purchase_code
				})
			},
			cleardata() {
				
				httpRequest.modal('', '确认清除上月已审核单据吗？', true, (res) => {
					if (res) {
						httpRequest.request('appapi/manage/goods/delorder', 'POST', {
							type: Number(this.current) + 1,
						}).then(res => {
							if(res.code==1){
								httpRequest.toast("清除成功")
								this.getlist(this.current)
							}else{
								httpRequest.toast(res.msg)
							}
						})
					}
				})
			},
			tabclick(item) {
				this.selectshow = false
				this.current = item.index
			}
		}
	}
</script>

<style lang="scss" scoped>
	// 定位点点点
	.diandiandian {
		position: relative;
	}

	.selectcontent {
		position: absolute;
		top: 50rpx;
		right: -6rpx;
		min-width: 247rpx;
		mix-width: 247rpx;
		text-align: center;
		background-color: rgba(11, 189, 203, 0.8);
		border-radius: 10rpx;
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #fff;
		padding: 20rpx 10rpx;
		word-wrap: break-word;
	}

	.sanjiao {
		position: absolute;
		top: -12rpx;
		right: 8rpx;
		background-image: url("@/static/image/system/sanjiao2.png");
		width: 40rpx;
		height: 12rpx;
		background-size: 100% 100%;
	}

	// 公共样式
	.contentbox-padding {
		padding: 0 30rpx;
	}

	.nostrongtext {
		color: #000000;
		font-size: 24rpx;
		font-weight: 500;
		max-width: 100%;
		word-wrap: break-word;
	}

	.color1 {
		color: #000000;
		font-size: 24rpx;
		font-weight: 500;
		max-width: 100%;
		word-wrap: break-word;
	}

	.color2 {
		color: #F3AD3D;
		font-size: 24rpx;
		font-weight: 500;
		max-width: 100%;
		word-wrap: break-word;
	}

	.color3 {
		color: #0BBDCB;
		font-size: 24rpx;
		font-weight: 500;
		max-width: 100%;
		word-wrap: break-word;
	}

	.smalltext {
		font-size: 20rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #999999;
	}

	// 销售订单
	.itemcontentbox {
		padding: 30rpx 0;
		border-bottom: 1rpx solid rgba(153, 153, 153, 0.06);
	}

	.xs1 {
		width: 24%;
		margin-right: 1%;
	}

	.xs2 {
		width: 20%;
		margin-right: 1%;
	}

	.xs3 {
		width: 21%;
		margin-right: 1%;
	}

	.xs4 {
		width: 19%;
		margin-right: 1%;
	}

	.xs5 {
		width: 11%;
	}

	// 收款单
	.sk1 {
		width: 29%;
		margin-right: 1%;
	}

	.sk2 {
		width: 24%;
		margin-right: 1%;
	}

	.sk3 {
		width: 24%;
		margin-right: 1%;
	}

	.sk4 {
		width: 13%;
	}
</style>
